$(".advanceBindCheckLogin").on("click",function(){
	window._clickThisBtn=$(this);
	window.carType.forcast = $(".advanceBindCheckLogin",".forecast-model").index(this);
	window.backCallName = 'forcastFun';
	checkLogin(MALL.accountQuickBase,'B');
});
//提交预告车型
window.forcastFun=function(){
	//location.reload();
	var param={};
	param['activityName']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('activityName');
	param['velBrandId']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('velBrandId');
	param['brandName']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('brandName');
	param['velSeriesId']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('velSeriesId');
	param['velSeriesName']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('velSeriesName');
	param['velModelId']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('velModelId');
	param['velModelName']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('velModelName');
	param['areaType']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('areaType');
	param['promotionId']  = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('promotionId');
	param['cityId']  = _getCookie("city.id");
	param['activityNo'] = $(".advanceBindCheckLogin",".forecast-model").eq(window.carType.forcast).attr('activityNo');
	$.ajax({
		url:"/promotion/saveProUserInfo.htm",
		type: "POST",
		data: param,
		dataType: "json",
		//contentType: "application/x-www-form-urlencoded; charset=utf-8",
		success: function(data){
			if(data>0)
			{	
				//投票后按钮置灰
				_clickThisBtn.attr("class","order-btn-grey");
				_clickThisBtn.text("已预约");
				_clickThisBtn.off("click");
				ECar.easyDialog.open({
					callback : function(){
						window.location.reload();
					},
					container : {
						header : '提示',
						content : '<div style="text-align:center">预约成功！</div>'						
					}
					//callback:isLogin
				});
			} else {
					//投票后按钮置灰
					_clickThisBtn.attr("class","order-btn-grey");
					_clickThisBtn.text("已预约");
					_clickThisBtn.off("click");
					ECar.easyDialog.open({
						callback : function(){
							window.location.reload();
						},
						container : {
							header : '提示',
							content : '<div style="text-align:center">您已经预约，不能重复操作！</div>'
						}
						//callback:isLogin
					});
			}
			
		},
		error: function(){
			ECar.easyDialog.open({
				callback : function(){
					window.location.reload();
				},
				container : {
					header : '提示',
					content : '<div style="text-align:center">未提交成功，请稍后再试</div>'
				}
			});
		}
	});
}
